//import java.io.PrintStream;
//import java.util.Objects;
//
//import static java.lang.System.out;
//
////public class Test {
//////    public static void main(String[] args) {
//////        int[] array1 = {1, 2, 3, 4, 5, 6, 7, 8, 9, 0};
//////        int[] array2 = Arrays.copyOf(array1, array1.length);
//////        array2[0] = 100;
//////
//////        Arrays.sort(array2);
//////        int index = Arrays.binarySearch(array2, 1);
//////        System.out.println(index);
////////        System.out.printf("array2[%d]: %d\n", index, array2[index]);
//////    }
////
//////    private String name;
//////
//////    public String getName() {
//////        return name;
//////    }
//////
//////    public void setName(String name) {
//////        this.name = name;
//////    }
////
//////    static void print(int a, int b, int ...args) {
//////        System.out.println(a);
//////        System.out.println(b);
//////        for (int arg : args) {
//////            System.out.print(arg + " ");
//////        }
//////        System.out.println();
//////        System.out.println(args);
//////    }
//////
//////    public static void main(String[] args) {
//////        print(1, 2, 3, 4, 5, 6, 7, 8, 9, 0);
//////    }
////
////    public static void swap(int x, int y) {
////        PrintStream ps = new PrintStream(System.out) {
////            @Override
////            public void println(String s) {
////                if ("a=10".equals(s)) {
////                    s = "a=100";
////                }
////                else if ("b=10".equals(s)) {
////                    s = "b=200";
////                }
////                super.println(s);
////            }
////        };
////
////        System.setOut(ps);
////    }
////
////    public static void main(String[] args) {
//////        int a = 10, b = 10;
//////        swap(a, b);
//////        System.out.println("a=" + a);
//////        System.out.println("b=" + b);
////
////        java.util.Date date = new java.util.Date();
////        java.sql.Date sqlDate = new java.sql.Date(date.getTime());
////        System.out.println();
////        String string = String.format("%d %s %.2f", 2024, "is", 2024.10);
////        System.out.println(string);
////    }
////}
//
////public class Test {
////    private String string;
////    private int number;
////    private double decimal;
////
////    public static void main(String[] args) {
////        out.println(Test.class.getSuperclass().getName());
//////        throw new RuntimeException("Test");
////    }
////}
//
//class Animal implements Cloneable {
//    private String name;
//    private int age;
//    public Animal(String name, int age) {
//        this.name = name;
//        this.age = age;
//    }
//
//    public void eat() {
//        out.println("Eating...");
//    }
//
////    @Override
////    public boolean equals(Object o) {
////        if (this == o) return true;
////        if (o == null || getClass() != o.getClass()) return false;
////        Animal animal = (Animal) o;
////        return age == animal.age && Objects.equals(name, animal.name);
////    }
//
//
////    @Override
////    public int hashCode() {
////        return Objects.hash(name, age);
////    }
//
//
//    @Override
//    public boolean equals(Object o) {
//        if (this == o) return true;
//        if (o == null || getClass() != o.getClass()) return false;
//        Animal animal = (Animal) o;
//        return age == animal.age && name.equals(animal.name);
//    }
//
//    @Override
//    public int hashCode() {
//        return Objects.hash(name, age);
//    }
//
//    @Override
//    protected Object clone() throws CloneNotSupportedException {
//        return super.clone();
//    }
//}
//
//class Dog extends Animal {
//    public Dog(String name, int age) {
//        super(name, age);
//    }
//
//    @Override
//    public void eat() {
//        out.println("dog is eating...");
//    }
//}
//
//class Cat extends Animal {
//    public Cat(String name, int age) {
//        super(name, age);
//    }
//
//    @Override
//    public void eat() {
//        out.println("cat is eating...");
//    }
//
//    public void cute() {
//        out.println("cat cute...");
//    }
//
//    @Override
//    public boolean equals(Object o) {
//        return super.equals(o);
//    }
//}
//
//public class Test {
//    public static void eat(Animal a) {
//        a.eat();
//        if (a instanceof Cat c) {
//            c.cute();
//        }
//    }
//
//    public static void main(String[] args) {
//        Animal dog = new Dog("Dog", 10);
//        eat(dog);
//        Animal cat = new Cat("Cat", 20);
//        eat(cat);
//
//        Cat cat2 = new Cat("Cat", 20);
//        out.println(cat == cat2);
//        out.println(cat.equals(cat2));
//    }
//}